/**
*@author       wuwg
*@createTime   2018/03/20
*@updateTime   2018/03/20
*@description
*@rule
 */
@import "../../../mixins/button/index";
@import "../../../config/config.less";

//命名空间
@css-prefix-btn: ~"@{css-prefix}btn";

.@{css-prefix-btn} {
  .btn();
  // default button
  .btn-default();

  // 长按钮
  &-long{
    width: 100%;
  }

  & > .@{css-prefix}icon + span,
  & > span + .@{css-prefix}icon{
    margin-left: 4px;
  }

  // primary button
  &-primary {
    .btn-primary();
    //
    //.@{css-prefix-btn}-group:not(.@{css-prefix-btn}-group-vertical) &:not(:first-child):not(:last-child) {
    //  border-right-color: @btn-group-border;
    //  border-left-color: @btn-group-border;
    //}
    //
    //.@{css-prefix-btn}-group:not(.@{css-prefix-btn}-group-vertical) &:first-child {
    //  &:not(:last-child) {
    //    border-right-color: @btn-group-border;
    //    &[disabled] {
    //      border-right-color: @btn-default-border;
    //    }
    //  }
    //}
    //
    //.@{css-prefix-btn}-group:not(.@{css-prefix-btn}-group-vertical) &:last-child:not(:first-child),
    //.@{css-prefix-btn}-group:not(.@{css-prefix-btn}-group-vertical) & + .@{css-prefix-btn} {
    //  border-left-color: @btn-group-border;
    //  &[disabled] {
    //    border-left-color: @btn-default-border;
    //  }
    //}
    //
    //.@{css-prefix-btn}-group-vertical &:not(:first-child):not(:last-child) {
    //  border-top-color: @btn-group-border;
    //  border-bottom-color: @btn-group-border;
    //}
    //
    //.@{css-prefix-btn}-group-vertical &:first-child {
    //  &:not(:last-child) {
    //    border-bottom-color: @btn-group-border;
    //    &[disabled] {
    //      border-top-color: @btn-default-border;
    //    }
    //  }
    //}
    //
    //.@{css-prefix-btn}-group-vertical &:last-child:not(:first-child),
    //.@{css-prefix-btn}-group-vertical & + .@{css-prefix-btn} {
    //  border-top-color: @btn-group-border;
    //  &[disabled] {
    //    border-bottom-color: @btn-default-border;
    //  }
    //}

  }
  // ghost button
  &-ghost {
    .btn-ghost();
  }
  &-cancel {
    .btn-cancel();
  }
  // dashed button
  &-dashed{
    .btn-dashed;
  }
  // text button
  &-text{
    .btn-text;
  }
  // success button
  &-success {
    .btn-color(@success-color);
  }
  // warning button
  &-warning {
    .btn-color(@warning-color);
  }
  // error button
  &-error {
    .btn-color(@error-color);
  }
  // info   button
  &-info {
    .btn-color(@info-color);
  }

  // circle   button
  &-circle,
  &btn-circle {
    .btn-circle(@css-prefix-btn);
  }

  //    button  mask
  &:before {
    position: absolute;
    top: -1px;
    left: -1px;
    bottom: -1px;
    right: -1px;
    background: #fff;
    opacity: 0.35;
    content: '';
    border-radius: inherit;
    z-index: 1;
    transition: opacity @transition-time;
    pointer-events: none;
    display: none;
  }
  //    button  loading
  &&-loading {
    pointer-events: none;
    position: relative;

    &:before {
      display: block;
    }
  }
}
